<?php $this->beginContent('//layouts/main'); ?>

<div class="span-7 prepend-top">
	<div id="sidebar">
		<?php
		if (!Yii::app()->user->isGuest && Yii::app()->user->id == 1) {
			$config = array(
				'title'=>'Admin Menu',
				'htmlOptions'=>array(
					'class'=>'append-bottom',
				)
			);
			$this->beginWidget('zii.widgets.CPortlet', $config);
			$config = array(
				'items'=>Yii::app()->adminMenu,
				'htmlOptions'=>array(
				)
			);
			$this->widget('zii.widgets.CMenu', $config);
			$this->endWidget();

			$config = array(
				'title'=>'Operations',
				'htmlOptions'=>array(
					'class'=>'append-bottom',
				)
			);
			$this->beginWidget('zii.widgets.CPortlet', $config);
			$this->widget('zii.widgets.CMenu',
				array(
				'items'=>$this->menu,
				'htmlOptions'=>array(),
				)
			);
			$this->endWidget();
		}

		$config = array(
			'title'=>'Chapter',
			'htmlOptions'=>array(
			)
		);
		$this->beginWidget(
			'zii.widgets.CPortlet', $config
		);
		$this->widget(
			'zii.widgets.CMenu',
			array(
			'items'=>Yii::app()->chapterMenu,
			'htmlOptions'=>array(),
			)
		);
		$this->endWidget();
		?>

	</div><!-- sidebar -->
</div>

<div class="span-17 prepend-top last">
	<div id="content">
		<?php echo $content; ?>
	</div><!-- content -->
</div>

<?php $this->endContent(); ?>